package com.lagou.common.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Id;
import java.lang.annotation.Documented;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName = "lagou",type = "product")
public class ProductES {

    @Id
    private long id;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String name;

    @Field(type = FieldType.Float)
    private double price;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String goodsDesc;
}
